<?php
define('ipos',true);
include("./include/config.php");
$q	 	= 	$_REQUEST['q'];
$qT		=	str_replace(" ","+",$q);
$key = htmlchars(strtolower(get_ascii(urldecode($q))));
$film = $db->database("ipos_film.phimid,ipos_film.tenphim,ipos_film.tentienganh,ipos_film.phimimg","film JOIN ipos_film_info ON (ipos_film_info.phimid = ipos_film.phimid)","ipos_film_info.timkiem LIKE '%$key%' ORDER BY ipos_film.viewed DESC LIMIT 8");
echo "<li><a class=\"search-for zme-autocomplete-activeItem\" href=\"tim-kiem/".$qT.".html\">Tìm kiếm với \"$q\"</a></li>\n";
if($film) {
	for($i=0;$i<count($film);$i++) {
		$url_phim	=	url_link($film[$i][1].'-'.$film[$i][2],$film[$i][0],'phim');
		echo "<li><a href=\"$url_phim\"><img width=\"35\" height=\"45\" class=\"search-img\" alt=\"$singername\" src=\"".$film[$i][3]."\"><strong>".$film[$i][1]."</strong><br>".$film[$i][2]."<br class=\"clr\"></a></li>";
	}
}
exit();
?>